package database;

import java.sql.Connection;
import java.sql.SQLException;

import database.dao.UserConsumeDao;
import database.pojo.UserConsumeInfo;
import util.JdbcUtils;
import util.MyFactory;

/**
 * 类名:UserRechargeDBServer
 * 描述:操作数据库表UserRecharge的接口
 * @author zk
 * @date 2018-4-20
 * @version 0.0.1
 *
 */
public class UserConsumeDBServer{
	public boolean insertUserConsume(UserConsumeInfo uInfo) throws SQLException{
		Connection conn = null;
		try{
			conn = MyFactory.context.getBean("JdbcUtils",JdbcUtils.class).getConnection();
			return MyFactory.context.getBean("UserConsumeDao", UserConsumeDao.class).insert(uInfo, conn);
		}finally{
			MyFactory.context.getBean("JdbcUtils",JdbcUtils.class).releaseConnection(conn);
		}
	}
}